var app = getApp();

Page({
    data: {},
    onLoad: function(t) {
        var a = this,
            user_id = wx.getStorageSync("users").id;
        app.setNavigationBarColor(a);
        app.util.request({
            url: "entry/wxapp/Agentstate",
            cachetime: "0",
            data: {
                user_id: user_id
            },
            success: function(res) {
                a.setData({
                    state: res.data.agent
                })
            }
        })
    },
    formSubmit: function(t) {
        wx.navigateTo({
            url: "info"
        });
    }
});